#ifndef __ITERATOR_H__
#define __ITERATOR_H__

namespace cs236703_spring2012_hw2
{

// The Iterator class is used to go over the linked list,
// get and set values, and add and remove nodes.
class Iterator
{
public:
	// What would happen if the d'tor is not virtual?
	virtual ~Iterator() {}
	// Add a new element before the current one
	virtual void AddBefore(int value, bool immutable) = 0;
	// Add a new element after the current one
	virtual void AddAfter(int value, bool immutable) = 0;
	// Indicate whether there's another element after the current one
	virtual bool HasNext() const = 0;
	// Indicate whether there's another element before the current one
	virtual bool HasPrevious() const = 0;
	// Move iterator to the next element, and return its content
	virtual int Next() = 0;
	// Move iterator to the previous element, and return its content
	virtual int Previous() = 0;
	// Remove the current element from the list. The element is still accessible
	// to iterators pointing on it, but not to any others.
	virtual void Remove() = 0;
	// Set the value of the pointed element.
	virtual void Set(int val) = 0;
	// Get the value of the pointed element.
	virtual int Get() const = 0;
};

}
#endif
